package com.leenmvc.core.security;

import com.leenmvc.core.security.entity.core.SysMenu;
import com.leenmvc.core.security.entity.core.SysRole;
import com.leenmvc.core.security.entity.core.SysUser;
import com.leenmvc.core.security.entity.core.SysUserToken;
import com.leenmvc.core.utils.thread.ThreadLocalManager;

import java.util.Date;
import java.util.Set;

/**
 * 全局User信息
 * 工具类
 *
 */
public class User {

    public static SysUser getUser() {
        return ThreadLocalManager.getUser();
    }

    public static Long getId() {
        return getUser().getId();
    }

    public static Long getRoleId() {
        return getUser().getRoleId();
    }

    public static String getUsername() {
        return getUser().getUsername();
    }

    public static String getPassword() {
        return getUser().getPassword();
    }

    public static String getRealName() {
        return getUser().getRealName();
    }

    public static String getHeadUrl() {
        return getUser().getHeadUrl();
    }

    public static Integer getGender() {
        return getUser().getGender();
    }


    public static String getEmail() {
        return getUser().getEmail();
    }


    public static String getMobile() {
        return getUser().getMobile();
    }

    public static String getUuid() {
        return getUser().getUuid();
    }

    public static Long getDeptId() {
        return getUser().getDeptId();
    }

    public static Integer getSuperAdmin() {
        return getUser().getSuperAdmin();
    }


    public static Integer getStatus() {
        return getUser().getStatus();
    }

    public static String getAddress() {
        return getUser().getAddress();
    }

    public static String getLinkman() {
        return getUser().getLinkman();
    }

    public static String getDuties() {
        return getUser().getDuties();
    }

    public static String getCustomName() {
        return getUser().getCustomName();
    }

    public static Long getUpdater() {
        return getUser().getUpdater();
    }

    public static Date getUpdateDate() {
        return getUser().getUpdateDate();
    }

    public static String getDeptName() {
        return getUser().getDeptName();
    }

    public static SysUserToken getToken() {
        return getUser().getToken();
    }

    public static Set<SysRole> getRoles() {
        return getUser().getRoles();
    }

    public static Set<SysMenu> getMenus() {
        return getUser().getMenus();
    }

    public static Set<String> getPermisions() {
        return getUser().getPermisions();
    }

}
